//package com.android.presenters;
//
//import HqFiveDayContract;
//import com.lzy.okgo.OkGo;
//import com.lzy.okgo.callback.StringCallback;
//
//import java.util.ArrayList;
//import java.util.List;
//
//import okhttp3.Call;
//import okhttp3.Response;
//
//public class HqFiveDayPresenter implements HqFiveDayContract.Presenter {
//
//    private HqFiveDayContract.View view = null;
//    private String code;
//    private String type;
//
//    private List<QuoteFiveMinutesData.DataBean.MinBean> allMinDatas = new ArrayList<>();
//
//    public HqFiveDayPresenter(HqFiveDayContract.View view, String code, String type) {
//        this.view = view;
//        this.code = code;
//        this.type = type;
//    }
//
//
//    @Override
//    public void start() {
//
//    }
//
//    @Override
//    public void onDestroy() {
//
//    }
//
//    @Override
//    public void getFiveDayInfo() {
//        OkGo.post(CommonURL.PUBLIC_SERVICE_QUOTE_LINE + CommonURL.QUOTE_REQUEST_EXPORT_FIVE)
//                .upString("\"" + QuoteStockInfoActivity.stockCode + "\"")
//                .execute(new StringCallback() {
//                    @Override
//                    public void onSuccess(String s, Call call, Response response) {
//                        QuoteFiveMinutesData quoteStockMinutesData = JsonUtil.parseJsonToBean(s, QuoteFiveMinutesData.class);
//                        if (quoteStockMinutesData != null) {
//                            String status = quoteStockMinutesData.getStatus();
//                            if (status.equals(CommonType.STATUS_TYPE_SUCCESS)) {
//                                allMinDatas.addAll(quoteStockMinutesData.getData().getMin4());
////                                min4Size = quoteStockMinutesData.getData().getMin4().size();
//                                allMinDatas.addAll(quoteStockMinutesData.getData().getMin3());
////                                min3Size = quoteStockMinutesData.getData().getMin3().size();
//                                allMinDatas.addAll(quoteStockMinutesData.getData().getMin2());
////                                min2Size = quoteStockMinutesData.getData().getMin2().size();
//                                allMinDatas.addAll(quoteStockMinutesData.getData().getMin1());
////                                min1Size = quoteStockMinutesData.getData().getMin1().size();
//                                allMinDatas.addAll(quoteStockMinutesData.getData().getMin0());
////                                min0Size = quoteStockMinutesData.getData().getMin0().size();
////                                quoteStockMinutesDatas = quoteStockMinutesData;
//
//                                if (allMinDatas.size() > 0) {
//                                    view.updateHqInfo(allMinDatas);
//                                }
//                            }
//                        }
//                    }
//
//                    @Override
//                    public void onError(Call call, Response response, Exception e) {
//                        super.onError(call, response, e);
////                        ToastUtil.show(getActivity(), "网络请求失败，请稍后重试");
//                    }
//                });
//
//    }
//}
